home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d10 / masdr54a.arc / SDLSETUP.BAT < prev    next >
DOS Batch File  |  1991-04-27  |  7KB  |  186 lines

  1. ECHO OFF
  2. : SDLSETUP.BAT for PC/MS DOS Version 3.0 or later
  3. IF NOT EXIST sdl_get.EXE GOTO FILES
  4. sdl_get E
  5. IF NOT ERRORLEVEL 20 GOTO ENVIRON
  6. sdl_get B
  7. IF EXIST SDLSETUP.TXT ERASE SDLSETUP.TXT
  8. set GET=SDLSETUP
  9. if NOT (%GET%)==(SDLSETUP) goto ENVIRON
  10. if NOT (%1)==() SET GET=SDLCONFG
  11. ECHO %GET%.BAT copyright (c) 1987-1991 Bob Stephan. All rights reserved.
  12. Echo * * * This version of %GET% is for PC or MS DOS * * *
  13. ECHO * * *
  14. ECHO This is a BATCH program so it may be a little slow, but
  15. ECHO you don't have to run it very often so please be patient.
  16. ECHO * * *
  17. sdl_get YE
  18. if errorlevel 2 goto drive_ok
  19. Echo It will run faster if you run it from a hard disk or a RAM disk (VDISK).
  20. Echo For best results COPY %GET%:SDL*.* to a RAM drive or to a subdirectory on
  21. Echo your hard disk. You may exit to do this now if you wish.  
  22. Echo If you use the floppy disk, it must NOT be write protected.
  23. ECHO * * *
  24. sdl_get N "Are you ready to continue (Y,n)? "
  25. IF ERRORLEVEL 126 GOTO QUIT
  26. IF NOT ERRORLEVEL 89 GOTO QUIT
  27. :drive_ok
  28. IF NOT EXIST SDL.COM GOTO FILES
  29. SDL /!
  30. SET $=54 55
  31. IF ERRORLEVEL 54 IF NOT ERRORLEVEL 55 GOTO READY
  32. IF ERRORLEVEL 155 GOTO VERSION
  33. IF NOT ERRORLEVEL 154 GOTO VERSION
  34. SET $=154 155
  35. :READY
  36. ECHO This program will modify the file SDL.COM on this disk.
  37. ECHO None of your original files will be modified in any way.
  38. ECHO Your CONFIG.SYS and AUTOEXEC.BAT will NOT be changed.
  39. ECHO * * *
  40. ECHO Checking system resources. Please wait.
  41. SDL_GET LE "MASDIR 5.4"
  42. IF NOT ERRORLEVEL 1 GOTO CKDEBUG
  43. ECHO If this is the original %GET% disk you should establish a working
  44. ECHO disk and/or directory to preserve the original (see SDLSETUP.DOC).
  45. ECHO * * *
  46. sdl_get N "Are you ready to continue (Y,n)? "
  47. IF ERRORLEVEL 126 GOTO QUIT
  48. IF NOT ERRORLEVEL 89 GOTO QUIT
  49. :CKDEBUG Test for running DEBUG
  50. IF EXIST DEBUG.COM GOTO CKFILES
  51. IF EXIST DEBUG.TST ERASE DEBUG.TST
  52. ECHO R >debug.txt
  53. ECHO Q >>debug.txt
  54. DEBUG <debug.txt >debug.tst
  55. IF NOT EXIST DEBUG.TST GOTO NODEBUG
  56. SDL_GET F DEBUG.TST
  57. IF %GET% == 0 GOTO NODEBUG
  58. IF EXIST DEBUG.T?T ERASE DEBUG.T?T >NUL
  59. :CKFILES
  60. FOR %%F IN (SDLPARMS.BAT SDLDEBUG.BAT SDLFINIS.BAT SDLNOTOG.BAT) DO IF NOT EXIST %%F GOTO FILES
  61. sdl_get D
  62. IF ERRORLEVEL 30 GOTO BEGIN
  63. IF NOT ERRORLEVEL 20 GOTO NOT1
  64. ECHO * * *
  65. set GET=SDLSETUP
  66. if NOT (%1)==() SET GET=SDLCONFG
  67. ECHO DOS Versions prior to 3.1 are not specifically supported. If you have
  68. Echo any difficulty running %GET% under DOS 2.x, please see SDLSETUP.DOC.
  69. ECHO R >sdlsetup.txt
  70. ECHO * * *
  71. :BEGIN
  72. ECHO All checks completed, ready to proceed with SETUP.
  73. ECHO * * *
  74. set GET=SDLSETUP
  75. if NOT (%1)==() SET GET=SDLCONFG
  76. ECHO If you do not want to continue with %GET% press Esc to exit...
  77. sdl_get C "Press C to continue, D to read the Documentation first(C,d): " CD}~
  78. IF ERRORLEVEL 126 GOTO QUIT
  79. IF ERRORLEVEL 125 GOTO CONTINUE
  80. IF ERRORLEVEL 67 IF NOT ERRORLEVEL 68 GOTO CONTINUE
  81. IF NOT EXIST SDLSETUP.DOC GOTO MENTION
  82. IF NOT EXIST SDL_SHOW.EXE MORE <SDLSETUP.DOC
  83. IF EXIST SDL_SHOW.EXE SDL_SHOW SDLSETUP.DOC
  84. set GET=SDLSETUP
  85. if NOT (%1)==() SET GET=SDLCONFG
  86. ECHO Returning to %GET% ...
  87. ECHO * * *
  88. GOTO CONTINUE
  89. :MENTION
  90. echo SDLSETUP.DOC was not found and cannot be displayed now.
  91. ECHO You may copy or print SDLSETUP.DOC from the original MASDIR disk.
  92. Pause
  93. :CONTINUE
  94. sdl_get B
  95. ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  96. ECHO * * *                     INSTRUCTIONS                              * * *
  97. ECHO * * *             Please read before proceeding.                    * * *
  98. ECHO * * *                                                               * * *
  99. ECHO You may exit at any point by pressing Ctrl-C and answering Y to terminate.
  100. ECHO * * *
  101. ECHO You may skip to the next section at ANY PROMPT by pressing the Escape key
  102. ECHO (Esc on most keyboards).  Note that all selections are made by "pressing"
  103. ECHO single keys.  These selections are NOT "entered" by pressing the Enter
  104. ECHO key after making the selection.
  105. ECHO * * *
  106. ECHO The questions are set up with the original defaults capitalized.  If you
  107. ECHO select the capitalized choices the original defaults will be restored.
  108. ECHO If the choices are not alphabetic, the first one shown is the original
  109. ECHO default.  Either caps or lower case letters are OK for your selections.
  110. ECHO * * *
  111. ECHO If you do not want to change the operation of a selection, just press
  112. ECHO the Enter key (sometimes called Return or "<CR>").  This is indicated as
  113. ECHO choice (cr). Or press Esc to skip to the next section of questions.
  114. ECHO * * *
  115. PAUSE
  116. REM Reset the size in GET
  117. sdl_get F SDL.COM
  118. IF (%1)==() SDLPARMS %$% %GET%
  119. IF (%1)==(SDLCONFG) SDLNOTOG %$% %GET%
  120. REM Normally the BATch file ends here, the rest are error messages.
  121. GOTO QUIT
  122. :NODEBUG
  123. ECHO * * *
  124. ECHO An error was encountered during the check of system resources.
  125. ECHO If the error message was "File creation error" and/or "File not found"
  126. ECHO it probably means the diskette is write protected.
  127. Echo * * *
  128. Echo If the error message was "Command or filename not recognized" or
  129. Echo 'Unknown command "debug"', or a similar message, it probably
  130. Echo means that your operating system is DR DOS.  Please see MASDIR54.NEW
  131. Echo for information on using the included DR DOS setup files, or contact
  132. Echo the author of MASDIR for a DR DOS compatible setup program.
  133. ECHO * * *
  134. ECHO If the message was "Bad command or file name" or similar, it means
  135. ECHO that the MS DOS system file DEBUG.COM is not available.
  136. ECHO This program must have access to the DOS external command file
  137. ECHO DEBUG.COM.  It must be in this directory on this disk or in
  138. ECHO one of the directories on your path, which is
  139. PATH
  140. set GET=SDLSETUP
  141. if NOT (%1)==() SET GET=SDLCONFG
  142. ECHO Please correct the problem and run %GET% again.
  143. goto quit
  144. :FILES
  145. ECHO * * *
  146. ECHO The following files must be in this current directory on this disk:
  147. FOR %%F IN (SDL.COM SDL_GET.EXE SDLPARMS.BAT SDLNOTOG.BAT) DO ECHO %%F
  148. FOR %%F IN (SDLSETUP.BAT SDLFINIS.BAT SDLDEBUG.BAT) DO ECHO %%F
  149. IF (%$%)==(54 55) ECHO SDLTITLE.COM
  150. GOTO QUIT
  151. :NOT1
  152. ECHO * * *
  153. ECHO MASDIR requires DOS 2.0 or higher (3.x preferred).
  154. GOTO QUIT
  155. :VERSION
  156. ECHO * * *
  157. set GET=SDLSETUP
  158. if NOT (%1)==() SET GET=SDLCONFG
  159. ECHO The version of SDL.COM on this disk is incompatible with this
  160. ECHO version of %GET%.  Please copy compatible versions from
  161. ECHO your original MASDIR disk and try again.
  162. GOTO QUIT
  163. :ENVIRON
  164. ECHO * * *
  165. ECHO There is insufficient DOS Environment space to run this program.
  166. ECHO You already have the following items set in the environment:
  167. ECHO * * *
  168. SET GET=
  169. SET
  170. ECHO * * *
  171. ECHO This program needs about 10 more bytes of space.  You can clear
  172. ECHO one or more of the items out of the environment by entering
  173. ECHO commands like
  174. ECHO SET var=
  175. ECHO Where var is the name of one of the objects shown between the
  176. ECHO lines of asterisks above.  Each name is followed by the = sign.
  177. ECHO When you enter the command do not put anything after the = sign,
  178. ECHO not even a space.  Just press the Enter key (cr) immediately after
  179. ECHO the = key.  Do not clear COMSPEC, PATH, or PROMPT.
  180. ECHO After you have cleared one or more names from the environment,
  181. ECHO run this program again.
  182. :QUIT
  183. pause
  184. REM SDLDEBUG will clean up any temporary files.
  185. sdldebug END
  186.